package com.ruoyi.lwpq.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.lwpq.mapper.LwpqPqrwMapper;
import com.ruoyi.lwpq.domain.LwpqPqrw;
import com.ruoyi.lwpq.service.ILwpqPqrwService;
import com.ruoyi.common.core.text.Convert;

/**
 * 派遣任务Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-03-16
 */
@Service
public class LwpqPqrwServiceImpl implements ILwpqPqrwService 
{
    @Autowired
    private LwpqPqrwMapper lwpqPqrwMapper;

    /**
     * 查询派遣任务
     * 
     * @param id 派遣任务主键
     * @return 派遣任务
     */
    @Override
    public LwpqPqrw selectLwpqPqrwById(Long id)
    {
        return lwpqPqrwMapper.selectLwpqPqrwById(id);
    }

    /**
     * 查询派遣任务列表
     * 
     * @param lwpqPqrw 派遣任务
     * @return 派遣任务
     */
    @Override
    public List<LwpqPqrw> selectLwpqPqrwList(LwpqPqrw lwpqPqrw)
    {
        return lwpqPqrwMapper.selectLwpqPqrwList(lwpqPqrw);
    }

    /**
     * 新增派遣任务
     * 
     * @param lwpqPqrw 派遣任务
     * @return 结果
     */
    @Override
    public int insertLwpqPqrw(LwpqPqrw lwpqPqrw)
    {
        lwpqPqrw.setCreateTime(DateUtils.getNowDate());
        return lwpqPqrwMapper.insertLwpqPqrw(lwpqPqrw);
    }

    /**
     * 修改派遣任务
     * 
     * @param lwpqPqrw 派遣任务
     * @return 结果
     */
    @Override
    public int updateLwpqPqrw(LwpqPqrw lwpqPqrw)
    {
        lwpqPqrw.setUpdateTime(DateUtils.getNowDate());
        return lwpqPqrwMapper.updateLwpqPqrw(lwpqPqrw);
    }

    /**
     * 批量删除派遣任务
     * 
     * @param ids 需要删除的派遣任务主键
     * @return 结果
     */
    @Override
    public int deleteLwpqPqrwByIds(String ids)
    {
        return lwpqPqrwMapper.deleteLwpqPqrwByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除派遣任务信息
     * 
     * @param id 派遣任务主键
     * @return 结果
     */
    @Override
    public int deleteLwpqPqrwById(Long id)
    {
        return lwpqPqrwMapper.deleteLwpqPqrwById(id);
    }
}
